package com.iplant.basic.service.basicenum.fmc;

import com.iplant.base.po.enums.BaseEnum;

/**
 * 条码类型
 *
 * @author YouWang·Peng
 * 2024-2-21 14:27:01
 */
public enum FMCBarCodeType implements BaseEnum {
    /**
     * 默认
     */
    Default(0, "默认"),
    /**
     * 热定型类
     */
    Heat(1, "热定型类"),
    /**
     * 芯子→产品
     */
    Core(2, "芯子→产品"),
    /**
     * 托盘→产品
     */
    Tray(3, "托盘→产品");

    private int value;
    private String label;
    private String remark;

    FMCBarCodeType(int value, String label) {
        this.value = value;
        this.label = label;
    }

    FMCBarCodeType(int value, String label, String remark) {
        this.value = value;
        this.label = label;
        this.remark = remark;
    }

    /**
     * 通过 value 的数值获取枚举实例
     *
     * @param val
     * @return
     */
    public static FMCBarCodeType getEnumType(int val) {
        for (FMCBarCodeType type : FMCBarCodeType.values()) {
            if (type.getValue() == val) {
                return type;
            }
        }
        return Default;
    }

    @Override
    public int getValue() {
        return value;
    }

    @Override
    public void setValue(int value) {
        this.value = value;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public void setLabel(String label) {
        this.label = label;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }
}